import {RectNode, RectNodeModel, h} from "@logicflow/core";

class CommonNodeModel extends RectNodeModel {

    initNodeData(data) {
        super.initNodeData(data);
        this.width = 120;
        this.height = 80;
        this.radius = 10;

        this.setProperties({
            nodeType: 'COMMON',
            type: 'COMMON',
            category: 'COMMON',
        });
    }

    getNodeStyle() {
        const style = super.getNodeStyle();
        style.stroke = '#E01E5B';
        style.fill = "#E01E5B";
        return style;
    }

    getTextStyle() {
        return {
            color: '#FFFFFF',     // 设置文字为白色
            fontSize: 14,
            fontWeight: 'bold'
        };
    }

}

class CommonNodeView extends RectNode {

}

export default {
    type: "CommonNode",
    view: CommonNodeView,
    model: CommonNodeModel
};
